Temperature compensated r-c oscillator

ABSTRACT

An R-C oscillator ( 200 ) is configured to vary the two voltage levels that are used to control the oscillation, such that the variation in oscillation frequency with temperature is minimized. A first resistor (R 1 ) is used to control one of the voltage levels, and a second resistor (R 2 ) having a temperature coefficient that differs from the temperature coefficient of the first transistor is used to control the other voltage level. The first resistor (R 1 ) also controls the current used to charge and discharge the capacitor (C) used to effect the oscillation. By the appropriate choice of resistance values, the variations of the control voltages and current are such that the time to charge and discharge the capacitor (C) between the control voltages remains substantially constant with temperature. Preferably the resistance values are selected to also compensate for temperature variations in the delay of the feedback loop.

This invention relates to the field of electronic circuit design, and in particular to a temperature compensated oscillator

Conventional R-C (resistor-capacitor) oscillators operate by systematically charging and discharging a capacitor via a current that is controlled by a resistor. The voltage across the oscillator is fed back to a switching device that alternately charges and discharges the capacitor. When the voltage on the capacitor reaches an upper limit, the switching device initiates a discharge of the capacitor; when the voltage on the capacitor reaches a lower limit, the switching device initiates a charge of the capacitor. The rate of charge and discharge to and from the capacitor that produces the voltage swing between the upper and lower voltage limits is controlled by the current flow through a resistor.

FIG. 1 illustrates an example prior art circuit diagram of a conventional R-C oscillator 100. A first stage includes a resistor R that controls current flow through a pair of diode-configured transistors 150 a, 150 b. The voltages at opposing nodes of the resistor provide a pair of voltage levels that are used to control the alternating charge and discharge of a capacitor C.

A switching stage includes a pair of comparators 110, 120, a bistable device 130, a switch 170, and a pair of transistors 150 b, 160 b that provide the charge or discharge currents to the capacitor C, as detailed below.

Assume, initially, that the switch 170 is configured to couple the capacitor C to the charging transistor 150 b, corresponding to a logic “0” at the Q-output of the bistable device 130. The comparator 110 compares the voltage on the capacitor C to the voltage level at the upper node of the resistor R. When the voltage level on the capacitor C increases to the voltage level at the upper node of resistor R, the bistable device 130 is reset, thereby asserting a logic “1” at the Q-output, which switches the coupling of the capacitor C to the discharging transistor 160 b. Thereafter, when the voltage level on the capacitor C decreases below the voltage level at the lower node of resistor R, the comparator 120 asserts a set signal to the bistable device 130. The set signal produces a logic “0” at the Q-output, thereby switching the coupling of the capacitor C back to the charging transistor 150 b.

When neither the set nor reset of the bistable device 130 is asserted, the bistable device 130 retains its prior output state. Thus, once the switch 170 is controlled to couple the capacitor to the particular charge/discharge transistor 150 b/160 b, the charging/discharging continues until the next reset/set signal is asserted. In this manner, the switching stage alternately charges and discharges the capacitor C between the first and second voltage levels on the upper and lower nodes of the resistor R, respectively. The rate of change of the voltage on the capacitor between the first and second voltage levels is controlled by the value of the resistor R, because the transistor pairs 150 b, 160 b are configured as current mirrors with the transistor pairs 150 a, 160 a.

Because the same current, I, is provided to charge and discharge the capacitor C, the oscillation will be symmetric, and the half-cycle time can be expressed as: T _(1/2)=((V _(h) −V _(l))*C)/I,  (1) where V_(h) is the upper limit voltage of the node of the resistor R at the comparator 110, and V_(l) is the lower limit voltage of the node of the resistor R at the comparator 120. However, (V _(h) −V _(l))=R*I,  (2) and thus T _(1/2) =R*C.  (3)

The operation of the prior art R-C oscillator 100 of FIG. 1 is particularly sensitive to temperature variations that affect the value of the resistor R. Although the value of the capacitor C is fairly constant with temperature, the value of the resistor R varies significantly with temperature. Assuming a typically positive temperature coefficient, as the operating temperature increases, the resistance of the resistor R increases, thereby increasing the half-cycle time, T_(1/2), in equation (3), above. In most semiconductor processes, the temperature coefficients of all resistors are of the same sign, and thus it is generally not possible to employ a negative-coefficient resistor to counter the temperature-varying effects of a positive-coefficient resistor, and vice versa.

Further compounding the problem, there is an inherent delay in the feedback loop of the switching stage, and this delay also increases with temperature, further decreasing the oscillation frequency of the oscillator 100.

It is an object of this invention to provide an R-C oscillator with reduced temperature dependency. It is another object of this invention to provide an R-C oscillator with reduced temperature dependency in a CMOS-compatible form.

These objects, and others, are achieved by an R-C oscillator that is configured to vary the two voltage levels that are used to control the oscillation, such that the variation in oscillation frequency with temperature is minimized. A first resistor is used to control one of the voltage levels, and a second resistor having a temperature coefficient that differs from the temperature coefficient of the first transistor is used to control the other voltage level. The first resistor also controls the current used to charge and discharge the capacitor used to effect the oscillation. By the appropriate choice of resistance values, the variations of the control voltages and current are such that the time to charge and discharge the capacitor between the control voltages remains substantially constant with temperature. Preferably the resistance values are selected to also compensate for temperature variations in the delay of the feedback loop.

FIG. 1 illustrates an example circuit diagram of a prior art R-C oscillator.

FIG. 2 illustrates an example circuit diagram of a temperature-compensated R-C oscillator in accordance with this invention.

Throughout the drawings, the same reference numeral refers to the same element, or an element that performs substantially the same function.

This invention is based on the observation that in most semiconductor processes, although the temperature coefficients of all resistors are of equal sign, the value of the temperature coefficient of different resistor-types can differ by an order of magnitude or more, and this difference in temperature coefficient can be used to compensate for the temperature effects of changes in resistance values, as well as other temperature-dependent effects.

For ease of understanding, the invention is initially presented using a zero-delay paradigm, wherein the delay between a voltage change and the results of the effects of the voltage change is zero.

FIG. 2 illustrates an example circuit diagram of a temperature-compensated R-C oscillator 200 in accordance with this invention. The additional components of this example circuit 200, relative to the example circuit 100, are the transistor pair 150 c, 160 c and the resistor R2 in series with these transistors 150 c, 160 c. Preferably, each of the N-channel transistors 160 a, 160 b, and 160 c are substantially identical, as are the Pchannel transistors 150 a, 150 b, and 150 c, although one of ordinary skill in the art will recognize that different sized transistors could be used, with appropriate changes to the equations below.

The diode-configured Nchannel transistor 160 c is configured similar to the transistor 160 a, and the Pchannel transistor 150 c is configured as a current mirror to the transistor 150 a, so that equal currents flow through resistors R1 and R2, and this is the same value of current, I, that charges and discharges the capacitor C.

Repeating equation (1), for convenience: T _(1/2)=((V _(h) −V _(l))*C)I.  (1)

In the circuit 200: Vh=I*R1+Vn,  (4) and Vl=I*R2+Vn,  (5) so that Vh−Vl=I*(R1−R2),  (6) and T _(1/2)=(R1−R2)*C  (7) where Vn is the reference voltage drop across a diode-connect Nchannel transistor 160 a, 160 c, and R1>R2. To maintain a constant oscillation cycle-time, the value (R1−R2) in this invention is configured to remain substantially constant, as detailed below.

As is known in the art, the temperature dependency of resistance with temperature can be expressed as: R(T)=R(T′)*(1+K*(T−T′)),  (8) where R(T) is the resistance at temperature T, R(T′) is the resistance at a temperature T′, and K is the temperature coefficient of the resistor R. This invention is based on the observation that, because R1 is larger than R2, a substantially constant resistance difference (R_(d)=R1−R2) may be provided by selecting a resistor R2 that has a higher temperature coefficient than R1. Defining K1 as the temperature coefficient of resistor R1 and K2 as the temperature coefficient of resistor R2, the temperature dependency of the difference term (R1−R2) in equation (7) is given by: R _(d)(T)=R1(T′)*(1+K1*(T−T′))−R2(T′)*(1+K2*(T−T′)),  (9) where R_(d)(T) is the difference resistance (R1−R2) at temperature T.

Because the difference resistance Rd should be constant across all temperatures, this constant can be defined at R_(d)(T) and R_(d)(T′) as: R _(d) =R _(d)(T)=R _(d)(T′)=R1(T′)−R2(T′).  (10)

Solving equations (9) and (10) for R2(T′) and R1(T′): R2(T′)=Rd*(K1/(K2−K1)),  (11) and R1(T′)=Rd+R2(T′).  (12)

The material with which a resistor is formed generally determines the temperature coefficient K of the resistor, and the resistance at a given temperature T′ is generally defined as the nominal resistance value at room temperature, and is defined by the dimensions of the resistance material. Thus, to achieve substantial temperature independence, a designer selects values of the capacitor C and the difference resistance Rd to achieve the desired oscillator frequency, then selects appropriate materials such that the temperature coefficient of the material that is used for resistor R2 (K2) is larger than the temperature coefficient of the material that is used for resistor R1 (K1), and solves for the nominal resistances of R2 and R1 using equations (11) and (12).

EXAMPLE

Consider the design of a CMOS oscillator having a desired oscillation frequency of 1 KHz, via the use of a 5 pF capacitor C and a difference resistance R_(d) of 100,000 ohms. The temperature coefficient of an Nwell resistor is known to be higher than the temperature coefficient of a Ppoly resistor; thus, resistor R2 will be formed as an Nwell resistor, and resistor R1 will be formed as a Ppoly resistor. Using a typical value of K1 of 0.06%/° C. for Ppoly resistors and of K2 of 0.5%/° C. for Nwell resistors: R2=100,000*(0.06/(0.50−0.06))=13,636 ohms, and R1=100,000+13,635=113,636 ohms.

In the foregoing, the delay within the feedback loop (from the capacitor C, through the comparators 110, 120, the bistable device 130, and the switch 170, and back to the capacitor C) is assumed to be zero. If the delay, D, is not substantially zero, the half-cycle time can be expressed as: T _(1/2) =D(T)+(R1(T)−R2(T))*C,  (13) where D(T)=D(T′)*(1+K _(d)*(T−T′)).  (14)

Expressing the half-cycle time in terms of an equivalent resistance, R_(eq) times the capacitance: T _(1/2) =R _(eq) *C=(D(T)/C+R1(T)−R2(T))*C,  (15) and, at T′, T _(1/2)=(D(T′)/C+R1(T′)−R2(T′))*C.  (16)

Solving equations 15 and 16 for R1(T′) and R2(T′): R2(T′)=((D(T′)/C)*(K _(d) −K1)+R _(eq) *K1)/(K2−K1),  (17) and R1(T′)=R _(eq) +R2(T′).  (18)

Note that the value of K_(d) is a function of the process parameters, which, in general, exhibit a variance. A nominal value of K_(d) can be used in the above equations 17, 18 to compensate for temperature variations under generally typical conditions. If more precise temperature compensation is desired, one or both of the resistors R1 and R2, are embodied as “trimmable” resistors. When the actual delay D(T′) at the reference temperature T′ (typically, room temperature, 20° C.) and the actual temperature K_(d) are determined, based on the fabrication of the oscillator, the above equations (17) and (18) are used to trim the one or both resistors R1, R2 to effect the appropriate compensation.

The foregoing merely illustrates the principles of the invention. It will thus be appreciated that those skilled in the art will be able to devise various arrangements which, although not explicitly described or shown herein, embody the principles of the invention and are thus within the spirit and scope of the following claims. 

1. An oscillator (200) comprising: a first resistor (R1), a second resistor (R2), and a capacitor (C), wherein an oscillation frequency of the oscillator (200) is dependent upon a difference between a first resistance value of the first resistor (R1) and a second resistance value of the second resistor (R2), the first resistance value being larger than the second resistance value, the first resistor (R1) exhibits a first rate of change with temperature, and the second resistor (R2) exhibits a second rate of change with temperature that is larger than the first rate of change, thereby allowing temperature-induced changes to the first resistance value to be offset by changes to the second resistance value, and thereby reducing variations in the oscillation frequency with temperature.
 2. An oscillator (200) as claimed in claim 1, comprising: a first stage (150 a-R1-160 a), operably coupled to the first resistor (R1), that is configured to provide a first voltage level, based on the first resistance value, a second stage (150 c-R2-160 c), operably coupled to the second resistor (R2), that is configured to provide a second voltage level, based on the second resistance value, and a switching stage (110-130, 170), operably coupled to the first stage (150 a-R1-160 a), the second stage (150 c-R2-160 c), and the capacitor (C), and is configured to: decrease a voltage on the capacitor (C) when the voltage increases to the first voltage level, increase the voltage on the capacitor (C) when the voltage decreases to the second voltage level.
 3. The oscillator (200) of claim 2, wherein the first resistor (R1) substantially controls current flows through the first stage (150 a-R1-160 a), the second stage (150 c-R2-160 c), and the capacitor (C).
 4. The oscillator (200) of claim 3, wherein the current flows through the first stage (150 a-R1-160 a), the second stage (150 c-R2-160 c), and the capacitor (C) are substantially equal in magnitude.
 5. The oscillator (200) of claim 4, wherein the second resistance value is selected based on the first resistance value, the first rate of change, and the second rate of change.
 6. The oscillator (200) of claim 5, wherein the second resistance value is selected based also on a delay associated with a feedback loop of the oscillator (200).
 7. The oscillator (200) of claim 5, wherein a value of the second resistance value at a base temperature includes a factor of R_(d)*(K1/(K2−K1)), and a value of the first resistance value at the base temperature is substantially equal to R_(d) plus the value of the second resistance value at the base temperature, where R_(d) corresponds to the difference between the first resistance value and the second resistance value at a base temperature, K1 is the first rate of change, and K2 is the second rate of change.
 8. The oscillator (200) of claim 7, wherein the value of the second resistance value at the base temperature further includes a second factor of (D/C)*((Kd−K1)/(K2−K1)), where D is a delay associated with a feedback loop of the oscillator (200) at the base temperature, C is a capacitance value of the capacitor (C), and Kd is a rate of change of the delay with temperature.
 9. The oscillator (200) of claim 1, wherein the first resistor (R1) is formed as a Ppoly resistor of a CMOS device, and the second resistor (R2) is formed as an Nwell resistor of the CMOS device.
 10. An oscillator (200) comprising: a first stage (150 a-R1-160 a) that includes: a diode-configured Pchannel device (150 a) operably coupled to a first voltage source, a diode-configured Nchannel device (160 a) operably coupled to a second voltage source, and a first resistor (R1) operably coupled in series between the diode-configured P-channel (150 a) and Nchannel (160 a) devices, a first voltage level being provided at a first node that couples the first resistor (R1) to the diode-configured Pchannel device (150 a), a second stage (150 c-R2-160 c) that includes a Pchannel device (150 c) operably coupled to the first voltage source and having a gate that is common to the first node, a diode-connected Nchannel device (160 c) operably coupled to the second voltage source, and a second resistor (R2) operably coupled in series between the Pchannel device (150 c) and the diode-configured Nchannel device (160 c) of the second stage (150 c-R2-160 c), a second voltage level being provided at a second node that couples the second resistor (R2) to the P-channel device (150 c); a switching stage (110-130, 170) that is configured to control a voltage on a capacitor (C) such that: the voltage is decreased when the voltage increases to the first voltage level, and the voltage is increased when the voltage decreases to the second voltage level.
 11. The oscillator (200) of claim 10, wherein the first resistor (R1) has a first temperature coefficient, and the second resistor (R2) has a second temperature coefficient that is substantially larger than the first temperature coefficient.
 12. The oscillator (200) of claim 11, wherein a reference voltage is provided at a reference node that couples the first resistor (R1) to the diode-configured Nchannel device (160 a) of the first stage (150 a-R1-160 a), and the switching stage (110-130, 170) includes a Pchannel device (150 b) operably coupled to the first voltage source and having a gate that is common to the first node, an Nchannel device (160 b) operably coupled to the second voltage source, and having a gate that is common to the reference node, wherein the switching stage (110-130, 170) is configured to couple the capacitor (C) to the P-channel device (150 b) of the switching stage (110-130, 170) to increase the voltage on the capacitor (C), and couple the capacitor (C) to the Nchannel device (160 b) of the switching stage (110130, 170) to decrease the voltage on the capacitor (C).
 13. The oscillator (200) of claim 12, wherein the switching stage (110-130, 170) includes: a first comparator (110) that is configured to compare the voltage on the capacitor (C) to the first voltage level, a second comparator (120) that is configured to compare the voltage on the capacitor (C) to the second voltage level, and a bistable device (130) that is configured to control the coupling of the capacitor (C) to the Pchannel device (150 b) and Nchannel device (160 b) of the switching stage (110-130, 170), based on an output of the first comparator (110) and an output of the second comparator (120).
 14. The oscillator (200) of claim 10, wherein a reference voltage is provided at a reference node that couples the first resistor (R1) to the diode-configured Nchannel device (160 a) of the first stage (150 a-R1-160 a), and the switching stage (110-130, 170) includes a Pchannel device (150 b) operably coupled to the first voltage source and having a gate that is common to the first node, an Nchannel device (160 b) operably coupled to the second voltage source, and having a gate that is common to the reference node, wherein the switching stage (110-130, 170) is configured to couple the capacitor (C) to the P-channel device (150 b) of the switching stage (110-130, 170) to increase the voltage on the capacitor (C), and couple the capacitor (C) to the Nchannel device (160 b) of the switching stage (110-130, 170) to decrease the voltage on the capacitor (C).
 15. The oscillator (200) of claim 14, wherein the switching stage (110-130, 170) includes: a first comparator (110) that is configured to compare the voltage on the capacitor (C) to the first voltage level, a second comparator (120) that is configured to compare the voltage on the capacitor (C) to the second voltage level, and a bistable device (130) that is configured to control the coupling of the capacitor (C) to the Pchannel device (150 b) and Nchannel device (160 b) of the switching stage (110-130, 170), based on an output of the first comparator (110) and an output of the second comparator (120).
 16. The oscillator (200) of claim 10, wherein the switching stage (110-130, 170) includes: a first comparator (110) that is configured to compare the voltage on the capacitor (C) to the first voltage level, a second comparator (120) that is configured to compare the voltage on the capacitor (C) to the second voltage level, and a bistable device (130) that is configured to control a direction of current applied to the capacitor (C) to increase or decrease the voltage on the capacitor (C), based on an output of the first comparator (110) and an output of the second comparator (120).
 17. The oscillator (200) of claim 10, wherein the first resistor (R1) is formed as a Ppoly resistor, and the second resistor (R2) is formed as an Nwell resistor. 